package com.ygo.feihua.BmobTable;

import org.json.JSONObject;

import cn.bmob.v3.BmobObject;

/**
 * 群聊信息对象
 * **/
public class GroupChatMessage extends BmobObject{
	/** 名字、消息和附加消息 **/
	MyUser userid;
	String name;
	String  message, extra;
	public GroupChatMessage(MyUser userid,String name, String message, String extra) {
		this.name=name;
		this.userid=userid;
		this.message = message;
		this.extra = extra;
	}

     	public String getName()
	{
		return name;
	}

	public MyUser getUserid() {
		return userid;
	}

	public String getMessage() {
		return message;
	}

	public String getExtra() {
		return extra;
	}
	
	/** 解析和生成对象 **/
	/*public static GroupChatMessage analysisAndCreateObject(JSONObject json){
		JSONObject jsonObject = json;
		try {
			jsonObject = jsonObject.getJSONObject("data");
			return new GroupChatMessage(jsonObject.getString("userid"),jsonObject.getString("name"), jsonObject.getString("message"), jsonObject.getString("extra"));
		} catch (Exception e) {
			// TODO Auto-generated catch block
            Log.e("转化错误","错误为"+e);
			e.printStackTrace();
			return null;
		}
	}
	*/
}
